<?php if($options['title']):?>
<div class='title'><?php echo CHtml::link($model->title, array('/admin/galleries/view', 'id'=>$model->id), array('target'=>'_blank')); ?></div>
<?php endif; ?>
<div id='<?php echo $this->id.'-'.$model->id; ?>'>
	<?php foreach($model->images as $image): ?>
	<a href="<?php echo Image::getFile($image->filename, $options['size']); ?>">
		<?php echo CHtml::image( Image::getFile($image->filename, 'thumb'), $image->alt); ?>
	</a>
	<?php endforeach; ?>
</div>